package wj;

import java.lang.reflect.Method;

public class wj {
    public static void main(String args[])throws Exception{
      User u=new User();
      u.setName("src/wj");
      System.out.println(u.getName());
      Class<?>  UU=Class.forName("src.wj.User");
      Object o=UU.newInstance();

        Method setName = UU.getMethod("setName",String.class);
        setName.invoke(o,"Jenkins");
        Method getName = UU.getMethod("getName");
        Object result = getName.invoke(o);
        System.out.println(result);


    }
}
